net: hns3: remove redundant variable initialization
authorPeng Li <lipeng321@huawei.com>
Thu, 20 Dec 2018 03:52:06 +0000 (11:52 +0800)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
This patch removes the redundant variable initialization,
as driver will devm_kzalloc to set value to hdev soon.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gbp-Pq: Topic bugfix/arm64/huawei-taishan
Gbp-Pq: Name 0025-net-hns3-remove-redundant-variable-initialization.patch

drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c

index 5570fb5dc2eb40079a86b4f32ce5779c80f29153..dca51d9cfa4fc96f61e163098a9729a4f0624d0c 100644 (file)
@@ -1360,7 +1360,7 @@ static int hclgevf_configure(struct hclgevf_dev *hdev)
 static int hclgevf_alloc_hdev(struct hnae3_ae_dev *ae_dev)
 {
        struct pci_dev *pdev = ae_dev->pdev;
-       struct hclgevf_dev *hdev = ae_dev->priv;
+       struct hclgevf_dev *hdev;
 
        hdev = devm_kzalloc(&pdev->dev, sizeof(*hdev), GFP_KERNEL);
        if (!hdev)